def print_gobang_board_while(size=15):
    """
    用while循环打印五子棋棋盘（纯线条+坐标）
    :param size: 棋盘线数（默认15×15标准尺寸）
    """
    print("🎮 while循环版五子棋棋盘（15×15）")
    print("=" * (4 * size + 3))  # 顶部分隔线
    
    # 1. 用while循环打印横向坐标（A-O）
    horizontal_coords = "   "
    coord_idx = 0  # 坐标索引（0对应A，1对应B...）
    while coord_idx < size:
        char = chr(ord('A') + coord_idx)
        horizontal_coords += f"{char:^2} "  # 每个坐标占2位居中，加空格分隔
        coord_idx += 1
    print(horizontal_coords)
    
    # 2. 打印顶部边框
    top_border = "  ┌"
    border_idx = 0
    while border_idx < size:
        top_border += "──"  # 每个格子的横向边框
        if border_idx < size - 1:
            top_border += "┬"  # 边框交点
        border_idx += 1
    top_border += "┐"
    print(top_border)
    
    # 3. 用while循环打印中间网格（竖线行+横线分隔）
    row = 0  # 行索引（0对应第1行，1对应第2行...）
    while row < size:
        # 打印纵向坐标（1-15）
        row_num = f"{row + 1:2d}"
        
        # 打印竖线行
        vertical_line = "│"
        col = 0  # 列索引
        while col < size:
            vertical_line += "  "  # 格子内空白
            if col < size - 1:
                vertical_line += "│"  # 竖线分隔
            col += 1
        vertical_line += "│"
        print(f"{row_num}{vertical_line}")
        
        # 打印横线分隔（最后一行后不打印）
        if row < size - 1:
            divider = "  ├"
            div_idx = 0
            while div_idx < size:
                divider += "──"
                if div_idx < size - 1:
                    divider += "┼"  # 交叉点
                div_idx += 1
            divider += "┤"
            print(divider)
        
        row += 1
    
    # 4. 打印底部边框
    bottom_border = "  └"
    bottom_idx = 0
    while bottom_idx < size:
        bottom_border += "──"
        if bottom_idx < size - 1:
            bottom_border += "┴"  # 底部交叉点
        bottom_idx += 1
    bottom_border += "┘"
    print(bottom_border)
    
    print("=" * (4 * size + 3))  # 底部分隔线

# 运行打印
if __name__ == "__main__":
    print_gobang_board_while()